package com.group02.community.entity.log;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 系统访问记录
 * </p>
 *
 * @author xl
 * @since 2022-07-01
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_logininfor")
@ApiModel(value = "SysLogininfor对象", description = "系统访问记录")
public class SysLogininfor implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("访问ID")
    @TableId(value = "info_id", type = IdType.AUTO)
    @ExcelProperty("访问编号")
    private Long infoId;

    @ApiModelProperty("用户账号")
    @TableField("user_name")
    @ExcelProperty("用户名称")
    private String userName;

    @ApiModelProperty("登录IP地址")
    @TableField("ipaddr")
    @ExcelProperty("登陆地址")
    private String ipaddr;

    @ApiModelProperty("登录地点")
    @TableField("login_location")
    @ExcelProperty("登陆地点")
    private String loginLocation;

    @ApiModelProperty("浏览器类型")
    @TableField("browser")
    @ExcelProperty("浏览器")
    private String browser;

    @ApiModelProperty("操作系统")
    @TableField("os")
    @ExcelProperty("操作系统")
    private String os;

    @ApiModelProperty("登录状态（0成功 1失败）")
    @TableField("status")
    @ExcelProperty("登陆状态")
    private String status;

    @ApiModelProperty("提示消息")
    @TableField("msg")
    @ExcelProperty("操作信息")
    private String msg;

    @ApiModelProperty("访问时间")
    @TableField(value = "login_time")
    @ExcelProperty("登陆时间")
    private String loginTime;

    @TableField(exist = false)
    @ExcelIgnore
    private String startTime;

    @TableField(exist = false)
    @ExcelIgnore
    private String endTime;

    @TableField(exist = false)
    @ExcelIgnore
    private String orderByColumn;

    @TableField(exist = false)
    @ExcelIgnore
    private String isAsc;
}
